package ZiXi;

import java.util.Random;
import java.util.Scanner;

public class zixi03 {
    public static void main(String[] args) {
        int[] arr=new int[5];
        for (int i = 0; i < arr.length; i++) {
            Random k=new Random();
            arr[i]=k.nextInt(100);
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入2-5之间是数字");
        int num=sc.nextInt();
        int count=0;System.out.println("符合条件的元素为：");

        for (int i = 0; i < arr.length; i++) {
            if(arr[i]%num==0){
                System.out.print(arr[i]+" " );

            }

        }





    }
}
